home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
softwareupdate
/
system
/
amigados
/
introduction
/
example1.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-10
|
2KB
|
68 lines
/***********************************************************/
/* */
/* Amiga C Encyclopedia (ACE) Amiga C Club (ACC) */
/* -------------------------- ------------------ */
/* */
/* Manual: AmigaDOS Amiga C Club */
/* Chapter: Introduction Tulevagen 22 */
/* File: Example1.c 181 41 LIDINGO */
/* Author: Anders Bjerin SWEDEN */
/* Date: 93-09-24 */
/* Version: 1.1 */
/* */
/* Copyright 1993, Anders Bjerin - Amiga C Club (ACC) */
/* */
/* Registered members may use this program freely in their */
/* own commercial/noncommercial programs/articles. */
/* */
/***********************************************************/
/* This short example examines the Dos library and */
/* prints the current version and revision number. */
/* Include the dos library definitions: */
#include <dos/dosextens.h>
/* Now we include the necessary function prototype files: */
#include <stdio.h> /* Std functions [printf()] */
#include <stdlib.h> /* Std functions [exit()] */
/* Set name and version number: */
UBYTE *version = "$VER: AmigaDOS/AmigaDOS/Example1 1.1";
/* Declare an external global library pointer to the Dos library: */
/* (Since the Dos library is always open we do not have to open it */
/* ourself. We simply declare the pointer as an external pointer */
/* and it will automatically be initialized for us. Very handy.) */
extern struct DosLibrary *DOSBase;
/* Declare our own function(s): */
int main( int argc, char *argv[] );
/* The main function: */
int main( int argc, char *argv[] )
{
/* We will now examine the Dos library: */
printf( "Dos library:\n" );
/* Print version (major changes): */
printf( " Version: %4d\n", DOSBase->dl_lib.lib_Version );
/* Print revision (minor changes): */
printf( " Revision: %3d\n", DOSBase->dl_lib.lib_Revision );
/* The End (0 = success) */
exit( 0 );
}